Skip to content

Improvement/mobile responsiveness#139

Merged
tonyantony300 merged 8 commits intomainfrom
improvement/mobile-responsiveness
Mar 10, 2026
Merged

Improvement/mobile responsiveness#139
tonyantony300 merged 8 commits intomainfrom
improvement/mobile-responsiveness

Conversation

@tonyantony300
Copy link
Owner

Description

Checklist

  • [x ] I have run npm run lint before raising this PR
  • [x ] I have run npm run format before raising this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 7, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Responsive UI adjustments across sender and receiver components, a mobile-only 30‑segment SVG circular progress ring added to the transfer UI, layout heights switched to dynamic viewport units, filename truncation and small responsive visibility tweaks, and a JSON schema file reformatted for whitespace only.

Changes

Cohort / File(s) Summary
Mobile progress UI
web-app/src/components/common/TransferProgressBar.tsx, web-app/src/components/common/PulseAnimation.tsx, web-app/src/components/common/TransferSuccessScreen.tsx
Adds a 30‑segment SVG circular progress ring for small screens and integrates it alongside the existing horizontal bar; updates responsive visibility classes (sm:hidden / sm:flex). Review SVG arc math, segment rendering, and sm breakpoint visibility.
Sender UI & controls
web-app/src/components/sender/BrowseButtons.tsx, web-app/src/components/sender/Dropzone.tsx, web-app/src/components/sender/SharingActiveCard.tsx, web-app/src/components/sender/Sender.tsx
Responsive layout rework: stacked-to-side button layout, adjusted button rounding/spacing, filename truncation (60 chars) for display, and container padding/height tweaks. Check truncated filename display, chevron/showFullPath behavior, and responsive spacing.
Receiver UI
web-app/src/components/receiver/Receiver.tsx, web-app/src/components/receiver/ReceivingActiveCard.tsx
Adjusted padding and responsive heights using dvh units; repositioned absolute help/stop controls with sm-specific offsets. Verify button placements across viewports.
Layouts & framing
web-app/src/components/layouts/RootLayout.tsx, web-app/src/components/ui/frame.tsx, web-app/src/routes/index.tsx, web-app/src/components/ui/sidebar.tsx, web-app/src/components/setting-sidebar/setting-sidebar.tsx
Switched main container sizing to h-dvh + min-h-screen, reduced FramePanel padding and added top margins/padding in various containers. Confirm page height, vertical spacing and scroll behavior on devices.
Settings & language
web-app/src/components/settings/language-select/language-select.tsx, web-app/src/routes/settings.tsx
Moved page title into a new FrameHeader and reordered Theme/Language controls in settings render order. Confirm header framing and keyboard focus order.
Footer & version
web-app/src/components/AppFooter.tsx
Replaced AppVersion component usage with an inline VERSION_DISPLAY span and adjusted imports. Verify version text rendering.
UI refinements
web-app/src/components/common/PulseAnimation.tsx, web-app/src/components/layouts/RootLayout.tsx, web-app/src/components/ui/frame.tsx, web-app/src/routes/index.tsx
Minor className and spacing tweaks across various UI pieces (padding, margins, visibility). Review responsive visual regressions.
Schema formatting
src-tauri/plugins/tauri-plugin-native-utils/permissions/schemas/schema.json
Indentation and whitespace normalization only; JSON keys and structure unchanged.

Possibly related PRs

  • Release/0.3.4 prep #118 — Modifies web-app/src/components/sender/SharingActiveCard.tsx; likely overlaps with sender UI/layout changes here.
  • Feat/setting #121 — Modifies web-app/src/components/AppFooter.tsx; related to the footer/version rendering change in this PR.
🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improvement/mobile-responsiveness

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
web-app/src/components/common/TransferSuccessScreen.tsx (1)

158-163: ⚠️ Potential issue | 🟠 Major

Please keep the Open action available on small screens.

Line 163 hides the button for every viewport below sm, which removes the only folder-opening action even when onOpenFolder is available. That’s a functionality regression in narrow/mobile layouts; a stacked layout would preserve the action without crowding the UI.

💡 Responsive fix
-				<div className="flex gap-3 w-full max-w-sm">
+				<div className="flex flex-col sm:flex-row gap-3 w-full max-w-sm">
 					<Button
 						type="button"
 						variant="secondary"
 						onClick={onOpenFolder}
-						className="flex-1 hidden sm:flex"
+						className="w-full sm:flex-1"
 					>
web-app/src/components/sender/Dropzone.tsx (1)

70-76: ⚠️ Potential issue | 🟡 Minor

Minor: Trailing space in className.

There's a trailing space in the className string that can be cleaned up.

🧹 Suggested fix
-						<span className="-mr-2 hidden sm:block ">
+						<span className="-mr-2 hidden sm:block">

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8589849a-12ed-4f53-941b-c555c87d8be6

📥 Commits

Reviewing files that changed from the base of the PR and between 536e024 and 40cad52.

📒 Files selected for processing (12)
  • src-tauri/plugins/tauri-plugin-native-utils/permissions/schemas/schema.json
  • web-app/src/components/common/PulseAnimation.tsx
  • web-app/src/components/common/TransferProgressBar.tsx
  • web-app/src/components/common/TransferSuccessScreen.tsx
  • web-app/src/components/layouts/RootLayout.tsx
  • web-app/src/components/receiver/Receiver.tsx
  • web-app/src/components/sender/BrowseButtons.tsx
  • web-app/src/components/sender/Dropzone.tsx
  • web-app/src/components/sender/Sender.tsx
  • web-app/src/components/sender/SharingActiveCard.tsx
  • web-app/src/components/ui/frame.tsx
  • web-app/src/routes/index.tsx

Comment on lines +150 to 152
<p className=" hidden sm:block text-lg font-medium mb-2 text-accent-foreground">
{getStatusText()}
</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor: Leading space in className.

There's a leading space before "hidden" in the className string.

🧹 Suggested fix
-				<p className=" hidden sm:block text-lg font-medium mb-2 text-accent-foreground">
+				<p className="hidden sm:block text-lg font-medium mb-2 text-accent-foreground">


return (
<div className="p-6 space-y-6 relative h-112 overflow-y-auto flex flex-col">
<div className="p-0 sm:p-6 space-y-6 relative h-[62dvh] sm:h-112 overflow-y-auto flex flex-col">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Avoid introducing a second scroll container here.

Line 95 combines a fixed h-[62dvh] with overflow-y-auto, but the surrounding page in web-app/src/components/common/SingleLayoutPage.tsx:8-12 already owns vertical scrolling. With body locked to overflow: hidden, this creates nested scrolling on mobile and makes the sender panel easy to “trap” while swiping. Prefer letting the outer layout scroll and using min-h/flex sizing here instead of a fixed inner scroller.

Suggested direction
-		<div className="p-0 sm:p-6 space-y-6 relative h-[62dvh] sm:h-112 overflow-y-auto flex flex-col">
+		<div className="p-0 sm:p-6 space-y-6 relative min-h-[62dvh] sm:h-112 flex flex-col">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="p-0 sm:p-6 space-y-6 relative h-[62dvh] sm:h-112 overflow-y-auto flex flex-col">
<div className="p-0 sm:p-6 space-y-6 relative min-h-[62dvh] sm:h-112 flex flex-col">

(viewState === 'SHARING' && isBroadcastMode)) && (
<>
<div className="text-center">
<div className="text-center mt-18 sm:mt-0">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Replace the magic top offset with layout-driven alignment.

Line 140 hard-codes vertical placement with mt-18, which is fragile on short or landscape screens and with longer localized copy. A flex-based centering strategy on the active-state wrapper will scale better than spending a fixed chunk of the mobile height budget on margin.

Comment on lines +181 to 184
<p className="text-xs mb-4 max-w-40 sm:max-w-120 truncate">
<strong className="mr-1">{t('common:sender.fileLabel')}</strong>{' '}
{selectedPath?.split('/').pop()}
</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Search for max-w-120 usage and check if there's custom Tailwind config extending max-width

# Check if max-w-120 is used elsewhere in the codebase
echo "=== Searching for max-w-120 usage ==="
rg -n 'max-w-120' --type-add 'web:*.{tsx,jsx,ts,js,css}' --type web

# Check Tailwind config for custom max-width extensions
echo "=== Checking Tailwind configuration ==="
fd -e js -e ts -e mjs 'tailwind.config' --exec cat {}

Repository: tonyantony300/alt-sendme

Length of output: 265


🏁 Script executed:

#!/bin/bash

# Search for tailwind config in web-app directory specifically
echo "=== Searching for Tailwind config in web-app ==="
fd -H 'tailwind' web-app --type f | head -20

# Check package.json for Tailwind version
echo "=== Checking Tailwind version in web-app ==="
if [ -f "web-app/package.json" ]; then
  jq '.dependencies | to_entries[] | select(.key | contains("tailwind"))' web-app/package.json
fi

# Check root package.json as well
echo "=== Checking Tailwind version in root ==="
if [ -f "package.json" ]; then
  jq '.dependencies, .devDependencies | to_entries[] | select(.key | contains("tailwind"))' package.json 2>/dev/null || true
fi

# Look for any CSS config or build tools
echo "=== Searching for PostCSS/build configs ==="
fd -H '\.(postcss|css\.js|tailwind)' web-app --type f

Repository: tonyantony300/alt-sendme

Length of output: 405


🏁 Script executed:

#!/bin/bash

# Check for other max-w usage patterns
echo "=== Searching for max-w usage in codebase ==="
rg -n 'max-w-' --type-add 'web:*.{tsx,jsx,ts,js}' --type web | head -30

# Check for arbitrary Tailwind values using bracket syntax
echo "=== Searching for arbitrary Tailwind values (bracket syntax) ==="
rg -n '\[.*\]' web-app/src/components --type tsx | grep -E '(max-w|max-h|w-|h-)' | head -20

# Check if there's a config extending theme
echo "=== Checking for theme extensions ==="
rg -n 'theme|extend' web-app --type ts --type js | head -20

# Check for any Tailwind warnings in tsconfig or other config
echo "=== Checking TypeScript or build config ==="
fd -H 'tsconfig\|next.config\|vite.config\|webpack' web-app --type f -x cat {}

Repository: tonyantony300/alt-sendme

Length of output: 17026


max-w-120 is not a valid Tailwind utility and needs correction.

Tailwind v4.1.18 doesn't include numeric utilities beyond the standard scale (which tops out at max-w-7xl). The value max-w-120 will be silently ignored and won't apply any width constraint. Use an arbitrary value instead: max-w-[30rem] (equivalent to 120 × 0.25rem = 480px) or max-w-[480px]. The responsive pattern itself—constraining width on mobile while expanding on larger screens—makes sense for the truncated file path.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
web-app/src/components/receiver/ReceivingActiveCard.tsx (1)

51-60: 🧹 Nitpick | 🔵 Trivial

Consider removing the redundant dark mode utility class.

The className includes both dark:not-disabled:before:shadow-none and dark:not-disabled:not-active:not-data-pressed:before:shadow-none. Since the former applies whenever not-disabled is true in dark mode, it already covers all cases where the latter would apply (the additional :not-active:not-data-pressed conditions are a subset). You could safely remove the more specific variant to reduce class complexity.

🧹 Suggested simplification
 <Button
   variant={'destructive-outline'}
   size="icon-lg"
   type="button"
   onClick={onStopReceiving}
-  className="absolute top-0 right-2 sm:right-6 rounded-full font-medium transition-colors not-disabled:not-active:not-data-pressed:before:shadow-none dark:not-disabled:before:shadow-none dark:not-disabled:not-active:not-data-pressed:before:shadow-none"
+  className="absolute top-0 right-2 sm:right-6 rounded-full font-medium transition-colors not-disabled:not-active:not-data-pressed:before:shadow-none dark:not-disabled:before:shadow-none"
   aria-label="Stop receiving"
 >

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4cb6620a-e657-4cf5-a5fd-4834972f0709

📥 Commits

Reviewing files that changed from the base of the PR and between 40cad52 and 212495d.

📒 Files selected for processing (3)
  • web-app/src/components/receiver/Receiver.tsx
  • web-app/src/components/receiver/ReceivingActiveCard.tsx
  • web-app/src/routes/index.tsx

variant="ghost"
onClick={() => setShowInstructionsDialog(true)}
className="absolute top-6 right-6"
className="absolute top-0 right-0 sm:top-6 sm:right-6"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider slight offset for the info button on mobile.

With the container padding reduced to p-2 on mobile and the button now at top-0 right-0, the info button sits right at the container's edge. This is functional, but you might find it feels a bit tight visually.

If it looks cramped during testing, a small offset like top-1 right-1 could provide a touch more breathing room while still being compact. That said, if it looks good on your test devices, feel free to keep it as-is!

@tonyantony300 tonyantony300 merged commit 6f197b1 into main Mar 10, 2026
2 of 3 checks passed
@tonyantony300 tonyantony300 deleted the improvement/mobile-responsiveness branch March 10, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants